package com.bfl.sa.sys.organization.converter;

import com.bfl.sa.sys.organization.entity.Job;
import com.bfl.sa.sys.organization.service.JobService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.convert.converter.Converter;

public class JobConverter implements Converter<String, Job> {

    @Autowired
    private JobService jobService;

    @Override
    public Job convert(String id) {
        return jobService.findOne(Long.parseLong(id));
    }
}
